package org.madgecko.api.service.impl;

import org.madgecko.api.dao.iface.IMemberDao;
import org.madgecko.api.model.Member;
import org.madgecko.api.service.iface.IMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author       : MadFrog
 * Date         : 2019/6/16 16:17
 * Description  :
 */
@Service
public class MemberService implements IMemberService {

    @Autowired
    private IMemberDao memberDao;

    @Override
    public Member loadByUserName(String username) {
        return memberDao.loadByUserName(username);
    }

    @Override
    public void update(Member member) {
        memberDao.update(member);
    }

    @Override
    public List<Member> listAllByScore() {
        return memberDao.listAllByScore();
    }

    @Override
    public Member load(Integer id) {
        return memberDao.load(id);
    }

}
